#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<map>
using namespace std;

int main(){
	string line;
	map<string, int> mp;
	int cnt = 0;
	while(cin >> line){
		string data;
		cin.get();
		getline(cin, data);
		if(!mp[line]){
			if(cnt > 0)
				cout << endl;
			cout << line << endl;
			mp[line] = 1;
			cnt++;
		}
		cout << data << endl;
	}
	return 0;
}
